#version 300 es
precision mediump float;
in vec2 vTexCoors;
in vec4 vAmbient;
in vec4 vDiffuse;
in vec4 vSpecular;

out vec4 fragColor;

uniform sampler2D sTexture;
void main()
{

  vec4 finalColor = texture(sTexture, vTexCoors);
    finalColor.a=(finalColor.r+finalColor.g+finalColor.b)/3.0;
  fragColor = finalColor*vAmbient+finalColor*vSpecular+finalColor*vDiffuse;
}